package org.lanqiao.tjut.control;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.lanqiao.tjut.myUtils.MyUtils;
import org.lanqiao.tjut.service.ServiceFactory;

public class CommitStuScore extends HttpServlet {

	private static final long serialVersionUID = 1L;

	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		// 获取新增数据串
		String txtscores = request.getParameter("txtscores");
		ServiceFactory.getSelectClassManagerServiceInstance().updateModStuScore(txtscores);

		// if () {
		// 输入日志
		MyUtils.logger_rootLogger.info("添加学生成绩成功！");
		// 跳转到相应页面进行显示
		request.getRequestDispatcher("QuerySelfClass").forward(request, response);
		// } else {
		// request.getSession().setAttribute("pageErrorInfo", "成绩添加失败！");
		// response.sendRedirect("Logined/Error.jsp");
		// }

	}

	@Override
	public void destroy() {
		// TODO Auto-generated method stub
		super.destroy();
	}

	@Override
	public void init() throws ServletException {
		// TODO Auto-generated method stub
		super.init();
	}

}
